package dmt16.TelemetrySuit.Communication
{
	import flash.events.IOErrorEvent;
	import flash.events.ProgressEvent;
	import flash.net.Socket;
	import flash.utils.Endian;

	public class PhysicalLayer extends Socket
	{		
		public static const COM1:int=5331;
		public static const COM2:int=5332;
		public static const COM3:int=5333;
		public static const COM4:int=5334;
		public static const COM5:int=5335;
		public static const COM6:int=5336;
		
		public static const ttyS0:int=5331;
		public static const ttyS1:int=5332;
		public static const ttyS3:int=5333;
		public static const ttyS4:int=5334;
		
		public static const TEST:int=5335;
		
		public function PhysicalLayer(port:int)
		{
			addEventListener(IOErrorEvent.IO_ERROR,_onIOError);
			super("127.0.0.1",port);
			endian=Endian.LITTLE_ENDIAN;
		}
		
		private var _IOErrorStatus:Boolean=false;
		public function get IOErrorStatus():Boolean{
			return _IOErrorStatus;
		}
		
		private function _onIOError(e:IOErrorEvent):void{
			_IOErrorStatus=true;
		}
	}
}